<style lang="less" scoped>
.panel {
  margin-bottom: 10px;
  &-title {
    display: flex;
    padding: 10px;
    border-bottom: 0.1px solid #eaeaea;
    background: white;

    &__label {
      flex: 1;
      font-size: 16px;
      align-items: center;
    }
  }
  &-content {
    margin-bottom: 10px;
    background: white;

    &__item {
      display: flex;
      padding: 10px 10px 0 10px;
      font-size: 14px;
      &-label {
        color: #666;
      }
      &-value {
        flex: 1;
        padding-left: 15px;
        color: #333;
      }
    }
  }
}
.main-pic {
  width: 400px;
  height: 200px;
}
</style>

<template>
  <div class="panel">
    <!-- title -->
    <div class="panel-title">
      <image class="main-pic" :src="item.ImageUrl" />
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">商标名称</div>
        <div class="panel-content__item-value">{{item.Name||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">商标类型</div>
        <div class="panel-content__item-value">{{item.IntClsDesc||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">注册号</div>
        <div class="panel-content__item-value">{{item.RegNo||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">申请时间</div>
        <div class="panel-content__item-value">{{item.AppDate||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">状态</div>
        <div class="panel-content__item-value">{{item.Status||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">申请人</div>
        <div class="panel-content__item-value">{{item.ApplicantCn||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">申请地址</div>
        <div class="panel-content__item-value">{{item.AddressCn||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">代理机构</div>
        <div class="panel-content__item-value">{{item.Agent||'-'||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
    <!-- title -->
    <div class="panel-title">
      <div class="panel-title__label">商品服务列表</div>
      <div class="panel-title__right"></div>
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="info" v-if="!item.ListGroup||Itemsitem.ListGroupItems.length==0">暂无数据</div>
      <template v-else>
        <div class="panel-content__item" v-for="(item1, index) in item.ListGroupItems" :key="index">
          <div class="panel-content__item-label">{{item1}}</div>
          <div class="panel-content__item-value"></div>
          <div class="panel-content__item-right"></div>
        </div>
      </template>
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">初审公告号</div>
        <div class="panel-content__item-value">{{item.AnnouncementIssue||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">初审公告日期</div>
        <div class="panel-content__item-value">{{item.AnnouncementDate||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">注册公告号</div>
        <div class="panel-content__item-value">{{item.RegIssue||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">注册公告日期</div>
        <div class="panel-content__item-value">{{item.RegDate||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>

    </div>

  </div>
</template>
<script>
export default {
  data() {
    return {
      item: {
        // AddressCn:
        //   '广东省深圳市福田区益田路5033号平安金融中心47、48、109、110、111、112层',
        // AddressEn: '',
        // Agent: '广州华进联合专利商标代理有限公司',
        // AgentKeyNo: '8bb548d2e9af9379c78acd31de025873',
        // AnnouncementDate: '',
        // AppDate: '2018-10-11',
        // ApplicantCn: '中国平安保险（集团）股份有限公司',
        // ApplicantCnKeyNo: '26020376e7c89b0f25fe591b9f3f6505',
        // ApplicantEn: '',
        // FlowItems: [
        //   {
        //     FlowDate: '2018-10-11',
        //     FlowId: '1384',
        //     FlowItem: '商标注册申请-申请收文-结束'
        //   }
        // ],
        // FlowStatus: '1384',
        // FlowStatusDesc: '商标注册申请-申请收文-结束',
        // Goods: null,
        // HasImage: true,
        // HitReason: null,
        // Id: 'NMPLSNSRUUSRR',
        // ImageUrl:
        //   'http://tm-image.qichacha.com/a4211c20a5f3802411fc2bcde74fdadc.jpg',
        // IntCls: 16,
        // IntClsDesc: '办公品',
        // ListGroupItems: [
        //   '文件夹(1611)',
        //   '报纸(1606)',
        //   '色带(1618)',
        //   '印刷出版物(1606)',
        //   '海报(1606)',
        //   '教学材料（仪器除外）(1619)',
        //   '日历（年历）(1605)',
        //   '书籍(1606)',
        //   '照片（印制的）(1607)',
        //   '包装纸(1609)'
        // ],
        // Name: '图形',
        // NameList: null,
        // RegDate: '',
        // RegNo: '33977932',
        // Status: 4,
        // ValidPeriod: '-'
      }
    };
  },
  onShow() {
    this.getInfos();
  },
  methods: {
    async getInfos() {
      const url = '/xcx/getTMDetailById';
      const params = {
        tm_id: this.$route.query.id
      };
      const res = await this.$http.get(url, params);
      if (res.status != 200) {
        wx.showToast({
          title: res.message || '获取失败！',
          icon: 'none',
          mask: true
        });
        return;
      }
      this.item = res.result;
    }
  }
};
</script>
